import { ListItemModel } from '@/interface';

export enum SpuPriceUnitEnum {
  DUN = 1,
  MM = 2,
  ZHANG = 3,
}

export const spuPriceUnitList: ListItemModel<SpuPriceUnitEnum>[] = [
  { label: '吨', value: SpuPriceUnitEnum.DUN },
  { label: 'm²', value: SpuPriceUnitEnum.MM },
  { label: '张', value: SpuPriceUnitEnum.ZHANG },
];

export enum SheetTypeEnum {
  ZHENG_DU = 1,
  DA_DU = 2,
  JU_BAN = 3,
  TE_GUI = 4,
}

export const sheetTypeList: ListItemModel<SheetTypeEnum>[] = [
  { label: '正度', value: SheetTypeEnum.ZHENG_DU },
  { label: '大度', value: SheetTypeEnum.DA_DU },
  { label: '菊版', value: SheetTypeEnum.JU_BAN },
  { label: '特规', value: SheetTypeEnum.TE_GUI },
];

export enum OutputUnitEnum {
  GE = 1,
  ZHANG = 2,
}

export const outputUnitList: ListItemModel<OutputUnitEnum>[] = [
  { label: '个', value: OutputUnitEnum.GE },
  { label: '张', value: OutputUnitEnum.ZHANG },
];

// 开票类型枚举
export enum InvoiceTypeEnum {
  VAT_NORMAL = 1,
  VAT_SPECIAL = 2,
}
export const invoiceTypeList: ListItemModel<InvoiceTypeEnum>[] = [
  { label: '普通增值税发票', value: InvoiceTypeEnum.VAT_NORMAL },
  { label: '专用增值税发票', value: InvoiceTypeEnum.VAT_SPECIAL },
];

// spu状态枚举
export enum SpuStatusEnum {
  ON_SHELVES = 1,
  OFF_SHELVES = 2,
}

export const spuStatusList: ListItemModel<SpuStatusEnum>[] = [
  { label: '已上架', value: SpuStatusEnum.ON_SHELVES, color: 'green' },
  { label: '已下架', value: SpuStatusEnum.OFF_SHELVES, color: 'red' },
];

// spu规格类型
export enum SpuSpecificationTypeEnum {
  ATTR = 1, // 值
  GROUP = 2, // 组
}

// spuUi组件枚举
export enum UiComponentEnum {
  SIZE_2D = 'size_2d',
  BUTTON_RADIO = 'button_radio',
  BUTTON_MULTIPLE = 'button_multiple',
  SELECT_NUM_INPUT = 'select_num_input',
  GROUP = 'group',
  LINKAGE = 'linkage',
  HIDDEN = 'hidden',
}

export const uiComponentList: ListItemModel<UiComponentEnum>[] = [
  { label: '二维尺寸(长X宽)', value: UiComponentEnum.SIZE_2D },
  { label: '单选按钮', value: UiComponentEnum.BUTTON_RADIO },
  { label: '多选按钮', value: UiComponentEnum.BUTTON_MULTIPLE },
  { label: '选择数里输入', value: UiComponentEnum.SELECT_NUM_INPUT },
  { label: '组合', value: UiComponentEnum.GROUP },
  { label: '联动组件', value: UiComponentEnum.LINKAGE },
  { label: '隐藏', value: UiComponentEnum.HIDDEN },
];

// 映射报价表-计价单位
export enum PriceUnitEnum {
  PIECE = 101, // 个
  DOZEN = 102, // 打
  BOX = 103, // 箱
  BOTTLE = 104, // 瓶
  SHEET = 105, // 张
  METER = 201, // 米
  CENTIMETER = 202, // 厘米
  MILLIMETER = 203, // 毫米
  PERIMETER_METER = 211, // 周长m
  PERIMETER_CENTIMETER = 212, // 周长cm
  PERIMETER_MILLIMETER = 213, // 周长mm
  KILOGRAM = 301, // 千克
  GRAM = 302, // 克
  TON = 303, // 吨
  LITER = 401, // 升
  MILLILITER = 402, // 毫升
  SQUARE_METER = 501, // 平方米
  SQUARE_CENTIMETER = 502, // 平方厘米
  SQUARE_MILLIMETER = 503, // 平方毫米
  RMB_YUAN = 601, // 元
  RMB_YUAN_PER_SQUARE_METER = 602, // 元/平方米
  RMB_YUAN_PER_TON = 603, // 元/吨
  UNIT_PRICE = 701, // 单价
  FIXED_PRICE = 702, // 固定价格
  PERCENTAGE = 801, // 百分比
  NUM = 802, // 数量
}

export const priceUnitList: ListItemModel<PriceUnitEnum>[] = [
  { label: '个', value: PriceUnitEnum.PIECE },
  { label: '打', value: PriceUnitEnum.DOZEN },
  { label: '箱', value: PriceUnitEnum.BOX },
  { label: '瓶', value: PriceUnitEnum.BOTTLE },
  { label: '张', value: PriceUnitEnum.SHEET },
  { label: '米', value: PriceUnitEnum.METER },
  { label: '厘米', value: PriceUnitEnum.CENTIMETER },
  { label: '毫米', value: PriceUnitEnum.MILLIMETER },
  { label: '周长m', value: PriceUnitEnum.PERIMETER_METER },
  { label: '周长cm', value: PriceUnitEnum.PERIMETER_CENTIMETER },
  { label: '周长mm', value: PriceUnitEnum.PERIMETER_MILLIMETER },
  { label: '千克', value: PriceUnitEnum.KILOGRAM },
  { label: '克', value: PriceUnitEnum.GRAM },
  { label: '吨', value: PriceUnitEnum.TON },
  { label: '升', value: PriceUnitEnum.LITER },
  { label: '毫升', value: PriceUnitEnum.MILLILITER },
  { label: '平方米', value: PriceUnitEnum.SQUARE_METER },
  { label: '平方厘米', value: PriceUnitEnum.SQUARE_CENTIMETER },
  { label: '平方毫米', value: PriceUnitEnum.SQUARE_MILLIMETER },
  { label: '元', value: PriceUnitEnum.RMB_YUAN },
  { label: '元/平方米', value: PriceUnitEnum.RMB_YUAN_PER_SQUARE_METER },
  { label: '元/吨', value: PriceUnitEnum.RMB_YUAN_PER_TON },
  { label: '单价', value: PriceUnitEnum.UNIT_PRICE },
  { label: '固定价格', value: PriceUnitEnum.FIXED_PRICE },
  { label: '百分比', value: PriceUnitEnum.PERCENTAGE },
  { label: '数量', value: PriceUnitEnum.NUM },
];

// 映射报价表类型
export enum QuotationTypeEnum {
  MATERIAL = 'C0001',
  PRINTING = 'C0002',
  PROCESS = 'C0003',
  MINIMUM_CONSUMPTION = 'C0004',
  FIXED_LOSS = 'C0005',
  PROFIT_PCT = 'C0006',
}

export const quotationTypeList: ListItemModel<QuotationTypeEnum>[] = [
  { label: '材质', value: QuotationTypeEnum.MATERIAL },
  { label: '印刷', value: QuotationTypeEnum.PRINTING },
  { label: '工艺', value: QuotationTypeEnum.PROCESS },
  { label: '最低消费', value: QuotationTypeEnum.MINIMUM_CONSUMPTION },
  { label: '固定放损', value: QuotationTypeEnum.FIXED_LOSS },
  { label: '利润占比', value: QuotationTypeEnum.PROFIT_PCT },
];

// 业务元属性类型
export enum BizMetaAttrKeyEnum {
  MATERIAL = 'C0001',
  PRINTING = 'C0002',
  PROCESS = 'C0003',
}
export const bizMetaAttrKeyList = [
  { label: '材质', value: BizMetaAttrKeyEnum.MATERIAL },
  { label: '印刷', value: BizMetaAttrKeyEnum.PRINTING },
  { label: '工艺', value: BizMetaAttrKeyEnum.PROCESS },
];

// spu大类类型
export enum SpuCategoryTypeEnum {
  BOX = 1, // 盒子
  RECHARGE = 2, // 充值
}
